package alOmrane.jdbc.beans;

public class Organigramme {
	private int id;
	private int code_niv;
	private String lib_niv;
	private int code_sup;
	private String lib_sup;
	public Organigramme() {
		super();
	}
	public Organigramme(int id,int code_niv, String lib_niv, int code_sup, String lib_sup ){

		this.id=id;
		this.code_niv = code_niv;
		this.lib_niv = lib_niv;
		this.code_sup = code_sup;
		this.lib_sup = lib_sup;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getCode_niv() {
		return code_niv;
	}
	public void setCode_niv(int code_niv) {
		this.code_niv = code_niv;
	}
	public String getLib_niv() {
		return lib_niv;
	}
	public void setLib_niv(String lib_niv) {
		this.lib_niv = lib_niv;
	}
	public int getCode_sup() {
		return code_sup;
	}
	public void setCode_sup(int code_sup) {
		this.code_sup = code_sup;
	}
	public String getLib_sup() {
		return lib_sup;
	}
	public void setLib_sup(String lib_sup) {
		this.lib_sup = lib_sup;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.getLib_niv();
	}
	@Override
	public boolean equals(Object obj) {
		return (this.getId()==((Organigramme)obj).getId());
	}
	
	public boolean isParent(Organigramme o){
		return this.getLib_niv().equals(o.getLib_sup());
	}

}
